Skip to content

feat: use fumadocs for website #1654

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open

feat: use fumadocs for website #1654

wants to merge 48 commits into from

Conversation

nperez0111
Copy link
Contributor

@nperez0111 nperez0111 commented May 2, 2025

This PR implements a new docs site, based on fumadocs.

I purposefully did not just update the existing docs site, so that we can compare the changes, and remove any cruft that may be left over.

So far, I've done the following:

  • Implemented the docs and examples content pages (with slight modifications to the content since titles are now generated from the frontmatter of the mdx files)
  • Moved over the pricing page (a one-off page that was in React)
  • Moved over the thank you page (an mdx page)
  • Moved over the sign in/sign up pages and functionality and put the sign in button in the header
  • Added an llms.txt and llms-full.txt file which are automatically generated from the docs content (useful for LLMs to understand out APIs)

What's left:

image

Copy link

vercel bot commented May 2, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
blocknote ✅ Ready (Inspect) Visit Preview Jul 14, 2025 10:24am
blocknote-website ✅ Ready (Inspect) Visit Preview Jul 14, 2025 10:24am

* Added home and about pages

* docs: Examples, footer, and remaining pages (#1784)

* Added examples card grid and fixed demo styling

* Added footer + remaining pages, cleaned up files

* Removed unused Logo component

* - Fixed home page contributors GH/Discord icons
- Fixed CSS file imports
- Removed codeblock/tabs from generated example MDX files (now handled by the `Example` component)
- Fixed component imports in MDX
- Refactored `Example` component
- Various styling fixes
- Added `meta.json` generation

* Fixed pro examples + minor changes/fixes

* Small fix

* Small fix

* Removed `console.log`

* Added missing examples pages to meta

* Small fix

* Fixed build

* Updated package lock

* Updated lockfile

* Fixed example path in playground

* Implemented PR feedback

* Updated page headings
Copy link
Collaborator

@YousefED YousefED left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Not really a lot of questions about the code - so focused on testing the design / different pages.

Generic:

AI:

Do we need to merge in changes from main?

  • AI button doesn't show in header
  • AI preview banner has been removed (maybe need to merge in updates from main)

Navbar:

  • examples / docs aren't highlighted in navigation when that page is active
  • can we make the navigation more consistent between docs and main pages?
  • remove light / dark toggle from nav (keep in footer like existing site)

Other:

Let's walk through the pages together and manually compare them (maybe on a call), with specific attention to dark + light, responsive, etc. We can then see together what we do / do not want to fix. Some things I already noticed (outside of the above):

  • dark mode sign in / sign up page looks a lot different


export const runtime = "edge";

export async function GET(request: Request) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: make sure we test this when deployed

import { Hero } from "./hero/Hero";
import { Letter } from "./letter/Letter";

export default function Home() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this directory named (home)? Is this a route group? https://nextjs.org/docs/app/api-reference/file-conventions/route-groups ? Should it be? (as it's a single page, right?)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree it's a little odd, but seems like it's the recommended setup for fumadocs since that's what they use for their site (https://github.com/fuma-nama/fumadocs/tree/dev/apps/docs/app/(home)). Either way, I'm pretty sure it's because you don't wanna render a HomeLayout in your root route layout (i.e. /app/layout.tsx) since that'll get inherited by all other routes. So while it's weird that it's in a route group, this seems to be the correct approach for fumadocs.

import { baseOptions } from "@/app/layout.config";
import { Footer } from "@/components/Footer";

export default function Layout({ children }: { children: ReactNode }) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trying to understand the setup, for which pages is this layout file used?

Copy link
Collaborator

@matthewlipski matthewlipski Jul 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The app/docs, app/examples, and app/pages routes correspond to the content/docs, content/examples, and content/pages directories. So the layout for app/pages is used for the about, thanks, and legal pages that we define in MDX in content/pages.

),
title: "Documentation",
description: "Learn how to use BlockNote",
url: "/docs",
props: {
className: "fesfesfes",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's fesfesfes?


export const metadata: Metadata = {
title: "Create Next App",
description: "Generated by create next app",
title: "BlockNote",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use same that we currently have (title and description)

(view-source:https://www.blocknotejs.org/)

Copy link
Collaborator

@YousefED YousefED left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • the video on the AI page doesn't work
  • examples open in a new window
  • examples return 404
  • examples don't show in sidebar
  • sign in page in dark mode shows a different logo font color compared to nav. Maybe remove that one altogether?
  • heading and page title here should be "introduction to blocknote". Are we losing info somewhere?
  • github links are broken (duplicate /examples)
  • I think we're missing some meta html tags compared to the current website, especially on docs pages (like og:image). Can you compare the current website vs the fumadocs version?
  • I can't scroll the sidebar separately from the content if it's height exceeds the viewport height

@@ -0,0 +1,64 @@
---
title: Schemas
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably forgot to update the frontmatter

imageTitle: Manipulating Content
---

Schemas are the core of how BlockNote works. They basic building blocks of the editor, and are used to define the content of the editor.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

second sentence is broken


You can create a schema using the `BlockNoteSchema.create` function.

```tsx twoslash
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The twoslash stuff is cool, but I think in this case the info it adds on hover is not very useful, because it complete expands the types of things like defaultBlockSpecs which is pretty convoluted


return <BlockNoteView editor={editor} />;
}
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you think about linking to the custom schemas page from this page?

Blocks can be:

- **Top-level blocks** - Direct children of the document
- **Nested blocks** - Children of other blocks (like list items within a list)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

list items within a list are not nested. Better examples are:

  • nested list items
  • indented blocks (which are considered "nested" in another block)

- Email
- Via the [`@blocknote/xl-email-exporter` package](/docs/features/export/email)

## Migrating Between Editors
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From here and below is cool, but I'm not sure it should be part of "foundations"


## Explore

<CardTable path="features/blocks" />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't show up for me in the preview

description: Learn how to localize BlockNote to support multiple languages and customize text strings
---

# Localization (i18n)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duplicate header

@@ -5,12 +5,12 @@ imageTitle: UI Components
path: /docs/ui-components
---

# Changing UI Components
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move the UI components one level up and put it before "styling & theming". Main reasons:

  • extra levels of nesting make things more difficult to find
  • customizing things like slash menu, toolbars are some of the most common scenarios
  • the other topic in react (styling & theming) needs quite some improvements (both code wise and docs)

}
```

## Practical Examples
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about adding examples to the reference. Reasons:

  • From a reference I expect it to be like sort of a real world dictionary, e.g.: function / type reference without many extras
  • we already have a system for examples. This will introduce more maintenance. We could link to existing examples, or if the current examples don't suffice, add new ones / change them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants